import request from '@/utils/request'

export function getJobsByGroup(groupId) {
  return request({
    url: '/xxl-job-admin/joblog/getJobsByGroup',
    method: 'post',
    params: { jobGroup: groupId }
  })
}

export function getLogsList(params) {
  return request({
    url: '/xxl-job-admin/joblog/pageList',
    method: 'post',
    params: params
  })
}

export function stopJob(id) {
  return request({
    url: '/xxl-job-admin/joblog/logKill',
    method: 'get',
    params: { id: id }
  })
}

export function getJobDetail(params) {
  return request({
    url: '/xxl-job-admin/joblog/logDetailCat',
    method: 'post',
    params: params
  })
}

export function clearLogs(params) {
  return request({
    url: '/xxl-job-admin/joblog/clearLog',
    method: 'get',
    params: params
  })
}

